﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- ////////////////////////////////////////////////////////////////////
//        *********请尊重我的劳动成果,添加我的著作权*******                                                
//               CreatData: 2017-5-11                            
//               Java Web /:期末作业                            
//               Project: 宿舍管理系统                          
//               软件学院：  学号 ：16171201041                 
//               版权所有：http://allday.gq                     
//               官方邮箱：562015969@qq.com                    
///////////////////////////////////////////////////////////////////// -->










<html>
  
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>Admin-Log</title>
    <meta name="renderer" content="webkit">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../plugins/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="../css/global.css" media="all">
    <link rel="stylesheet" href="../plugins/font-awesome/css/font-awesome.min.css"></head>
  
  <body>
    <div style="margin: 15px;">
      <blockquote class="layui-elem-quote">
<form class="layui-form" action=""><!--跳到action再回来-->
				<div class="layui-form-item">
						<h1>Admin-Log 宿舍记录</h1>

					<label class="layui-form-label">宿舍楼号</label>
					<div class="layui-input-inline">
						<select name="drom_no" lay-verify="required">
								<option value="">请选择宿舍号</option>
							<optgroup label="男生宿舍">
								<option value="#1">#1</option>
								<option value="#2">#2</option>

							</optgroup>
							<optgroup label="女生宿舍">
								<option value="\#8">#8</option>
								<option value="七号楼">#7</option>
							</optgroup>
						</select>
					</div>
				    <button class="layui-btn" lay-submit="" lay-filter="drom">确定</button>

				</div>		
				</form>

				</blockquote>
      <fieldset class="layui-elem-field">
        <legend>记录开始</legend>
        <div class="layui-field-box">
          <table align="center" class="layui-table">
            <thead>
              <tr>
                <th>ID</th>
                <th>入住人</th>
                <th>操作类型</th>
                <th>备注</th>
                <th>操作人</th>
                <th>操作时间</th></tr>
            </thead>
<!--             <tbody>
              <tr>
                <td style="text-align: center;">1</td>
                <td style="text-align: center;">李明</td>
                <td style="text-align: center;">入住</td>
                <td>
                  <p>校区学院</p>
                </td>
                <td style="text-align: center;">学生学号</td>
                <td>2017-01-10 10:42:36</td></tr>
              <tr>
            </tbody> -->
			
			            <tbody id="content"></tbody>

          </table>
        </div>
      </fieldset>
    </div>
	    <!--模板-->
		<script type="text/html" id="tpl">
			{{# layui.each(d.list, function(index, item){ }}
			<tr>
				<td>{{ item.id }}</td>
				<td>{{ item.name }}</td>
				<td>{{ item.type }}</td>
				<td>{{ item.xqxy }}</td>
				<td>{{ item.no }}</td>
				<td>{{ item.date }}</td>
			</tr>
			{{# }); }}
		</script>
    <script type="text/javascript" src="../plugins/layui/layui.js"></script>
    <script>
	layui.config({
        base: '../js/'
      });

      layui.use(['paging', 'form'],
      function() {
        var $ = layui.jquery,
        paging = layui.paging(),
        layerTips = parent.layer === undefined ? layui.layer: parent.layer,
        //获取父窗口的layer对象
        layer = layui.layer,
        //获取当前窗口的layer对象
        form = layui.form();

        paging.init({
          openWait: true,
          url: '../datas/btable_data_SsLog.json?v=' + new Date().getTime(),
          //**********地址可以通过访问action获取json值得参数**********
          elem: '#content',
          //内容容器
          params: { //发送到服务端的参数
          },
          type: 'GET',
          tempElem: '#tpl',
          //模块容器
          pageConfig: { //分页参数配置
            elem: '#paged',
            //分页容器
            //pageSize: 3 //分页大小
          },
          success: function() { //渲染成功的回调
            layer.msg('获取成功');
          },
          fail: function(msg) { //获取数据失败的回调
			 layer.msg('获取数据失败');
          },
          complate: function() { //完成的回调
            //alert('处理完成');
            //重新渲染表单框

          },
        });

		  form.on('submit(drom)', function(data){
    layer.msg(JSON.stringify(data.field));
    return true;
  });
		
		
      });</script>
  </body>

</html>